package Demo02.setName;
//设置一个线程名称
public class MyThread extends Thread {

    public MyThread(){}

    public MyThread(String name){
        super(name);
    }

    @Override
    public void run() {
        //获取线程名称
        System.out.println(Thread.currentThread().getName());
    }
}
